# 使用Python 3.9.6 作为基础镜像
FROM python:3.9.6

# 设置工作目录
WORKDIR /python

# 复制应用程序代码到容器中
COPY . /python

# 安装所需的Python软件包
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt

# 设置环境变量
ENV IMAGE_FOLDER="img" \
    HTML_FOLDER="singerclub_share_html/" \
    VERIFICATION_KEY="6shyg3uens21412slhdy3dmh47skvgq5y" \
    WEB_PAGE_PREFIX="http://app-test-h5.singerclub.cn/" \
    PROJECT_PATH="D:\work\h5-app-web" \
    DB_HOST="mysql" \
    DB_USER="root" \
    DB_PASSWORD="password" \
    DB_NAME="web_images"

# 暴露端口
EXPOSE 5000

# 启动应用程序
CMD ["python", "app.py"]
